import matplotlib.pyplot as plt
import seaborn as sns
classes = ['一班','二班','三班','四班']
scores = [91,93,90,92]
plt.figure(figsize=(8,6))
sns.set_style(style='darkgrid',rc={'font.sans-serif':'SimHei'})
plt.subplot(1,2,1)
a=sns.color_palette(palette='Reds',n_colors=4,desat=0.8)
sns.barplot(x=classes,y=scores,palette=a)
plt.title('红色系')
plt.subplot(1,2,2)
b=sns.color_palette(palette='Blues',n_colors=3,desat=0.8)
sns.barplot(x=classes,y=scores,palette=b)
plt.title('蓝色系')
plt.savefig('C:/色系.png')
plt.show()